from com.db.DBconn import DBconn


class Find:
    
    def foo(self):
        str = eval(input())
    # 打开数据库连接
        dbConn=DBconn()
        conn = dbConn.getConn()
        cursor = conn.cursor()
# SQL 查询语句
        sql = "SELECT * FROM t_student where id={0}".format(str)
        try:
            # 执行SQL语句
            cursor.execute(sql)
            # 获取所有记录列表
            results = cursor.fetchall()
            if(len(results)==0):
                print("很抱歉，你输入的ID不存在")
            else:
                for row in results:
                    id = row[0]
                    sNumber = row[1]
                    sName = row[2]
                    cName = row[3]
                            # 打印结果
                    print (id, sNumber, sName, cName )
        except:
                    print ("系统异常")
            # 关闭数据库连接
        conn.close()
xs=Find()
xs.foo()    
    